package com.homedo.odin.solution.service;

import com.homedo.core.common.base.service.BaseService;
import com.homedo.odin.solution.dao.UserRequireMapper;
import com.homedo.odin.solution.model.entity.UserRequire;
import java.util.Date;
import java.util.List;
import org.springframework.stereotype.Service;

/**
 * <p> 用户需求表 服务实现类 </p>
 *
 * @author HarveyDing
 * @since 2018-03-08
 */
@Service
public class UserRequireServiceImpl extends BaseService<UserRequireMapper, UserRequire> {

    public List<UserRequire> queryUserRequireListByParam(Integer userId, String description, Integer status,
            Date createStartTime, Date createEndTime) {
        return baseMapper.queryUserRequireListByParam(userId, description, status, createStartTime, createEndTime);
    }

    public void addUserRequire(UserRequire userRequire) {
        baseMapper.insert(userRequire);
    }

    public UserRequire getUserRequire(Integer id) {
        return baseMapper.selectById(id);
    }

    public void updateUserRequire(UserRequire userRequire) {
        baseMapper.updateById(userRequire);
    }
}
